<%@page import="com.sun.swing.internal.plaf.metal.resources.metal"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.wanmait.movies.vo.Discuss"%>
<%@page import="com.wanmait.movies.vo.Concerned"%>
<%@page import="com.wanmait.movies.vo.Pager"%>
<%@page import="com.wanmait.movies.vo.Collect"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	
	ArrayList<Collect> allCollects = (ArrayList<Collect>)request.getAttribute("usercollects");
	ArrayList<Concerned> allConcerns = (ArrayList<Concerned>)request.getAttribute("userconcerns");
	ArrayList<Discuss> allComments = (ArrayList<Discuss>)request.getAttribute("usercomments");
	ArrayList<Discuss>allrecomments = (ArrayList<Discuss>)request.getAttribute("userrecomments");
	request.removeAttribute("usercollects");
	request.removeAttribute("userconcerns");
	request.removeAttribute("usercomments");
	request.removeAttribute("userrecomments");
	
	if(allCollects != null){
	for(Collect m:allCollects){
%>
		<li class="collect_list_li">
       		<img src="/movies/images/<%=m.getMovieId().getMovieImage() %>">
       		<a href="/movies/MoviesServlet?action=showovies&movieId=<%=m.getId()%>"><%=m.getMovieId().getMovieName() %></a>
       		<a>上映时间：<%=new SimpleDateFormat("yyyy-MM-dd").format(m.getMovieId().getMovieShowtime())%></a>
            <a href="/movies/UserServlet?action=collectdelete&collectid=<%=m.getId()%>"><input type="button" value="已收藏" class="collect_btn"></a>
            
    	</li>
<%
	}}
	%>
	<%  
	if(allConcerns != null){
	for(Concerned c : allConcerns){
%>
		<li class="concern_list_li">
       		<img src="/movies/images/<%=c.getUserId().getUserFaceimage() %>">
       		<a href="/movies/TaRenServlet?action=userPage&uzi=<%=c.getUserId().getId()%>"><%=c.getUserId().getUserName() %></a>
          	<a href="/movies/UserServlet?action=concerneddelete&concernedid=<%=c.getId()%>"><input type="button" value="已关注" class="concern_btn"></a>
       		
    	</li>
<%
	}}
	%>
	<%
	if(allComments != null){
	for(Discuss d: allComments){
	%>
		<li class="comment_list_li">
			
       		<img src="/movies/images/<%=d.getMovieId().getMovieImage()%>">
       		<a href="/movies/MoviesServlet?action=showovies&movieId=<%=d.getMovieId().getId()%>"><%=d.getMovieId().getMovieName()%></a>
       		<a><%=new SimpleDateFormat("yyyy-MM-dd").format(d.getMovieId().getMovieShowtime()) %></a>
       		<br>
       		<span>&emsp;&emsp;&emsp;我的评论:<%=d.getMovieDiscuss() %></span>
       		<a href="/movies/UserServlet?action=discussdelete&discussid=<%=d.getId()%>"><input type="button" value="删除评论" class="discuss_btn"></a>

    	</li>
	<%
	}}
	%>
	<%
	if(allrecomments != null){
	for(Discuss d: allrecomments){
	%>
		<li class="recomment_list_li">
			<a href="/movies/MoviesServlet?action=showovies&movieId=<%=d.getMovieId().getId()%>"><%=d.getMovieId().getMovieName() %></a>
			<span><%=new SimpleDateFormat("yyyy-MM-dd").format(d.getDiscussTime())%></span><br>
			<span>我的评论:<%=d.getMovieDiscuss() %></span><br>
       		<img src="/movies/images/<%=d.getMovieId().getMovieImage()%>">
			<a><%=d.getUserId().getUserName() %></a>评论了我:
			<span><%=d.getReDiscuss() %></span><br>
    	</li>
	<%
	}}
	%>
     	 
     	 
      		   
          